package com.jintian.smart.kernel.security.provider;

import com.jintian.smart.base.api.security.provider.IApiEncryptProvider;
import com.jintian.smart.kernel.security.encrypt.ApiEncryptService;
import jakarta.annotation.Resource;
import org.apache.dubbo.config.annotation.DubboService;

@DubboService(timeout = 6000)
public class ApiEncryptProvider implements IApiEncryptProvider {
    @Resource
    private ApiEncryptService apiEncryptService;

    /**
     * 解密
     */
    public String decrypt(String data) {
        return apiEncryptService.decrypt(data);
    }

    /**
     * 加密
     */
    public String encrypt(String data) {
        return apiEncryptService.encrypt(data);
    }
}
